from django.db import models


# Create your models here.


class Student(models.Model):
    name = models.CharField(max_length=16)
    age = models.IntegerField(default=1)


class Grade(models.Model):  # 1个班级
    name = models.CharField(max_length=32)


class XueSheng(models.Model):  # 多个学生
    name = models.CharField(max_length=16)
    grade = models.ForeignKey(Grade, on_delete=models.PROTECT)

